package com.yusong.test.listener;

/**
 * Created by yusong on 2017/3/7.
 * 监听器
 */

import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;

public class BlackListNotifier implements ApplicationListener {
    public void onApplicationEvent(ApplicationEvent event) {
        System.out.println(event);
        if (event instanceof BlackListEvent) {
            System.out.println(((BlackListEvent) event).getAddress());
            //TODO 处理这个邮件地址
        }
    }
}